package com.lagou.edu.factory;

import com.lagou.edu.utils.ConnectionUtils;

import java.util.*;


public class CreateFactory {

    private String name;
    private int age;

    public void setName(String name) {
        this.name = name;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "CreateFactory{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }

    /*private ConnectionUtils connectionUtils;
    private List<Integer> myList;
    private Set<String> mySet;
    private Map<String, Object> myMap;
    private String[] myArray;
    private Properties myProperties;*/


    //spring ioc 实例化bean的第二种方式:静态方法创建
    public static ConnectionUtils getConnectionUtils() {
        return new ConnectionUtils();
    }

    //spring ioc 实例化bean的第三种方式: 实例化方法创建
    public ConnectionUtils getInstance() {
        return new ConnectionUtils();
    }
}
